import java.io.Serializable;

    //Serializable接口是 Java 提供的一个标记接口，它不包含任何方法。当一个类实现了这个接口，就表明该类的对象可以被序列化
public class Student implements Serializable {
    private String studentId;
    private String name;
    private int age;
    private double averageScore;

    // 构造方法
    public Student(String studentId, String name, int age, double averageScore) {
        this.studentId = studentId;
        this.name = name;
        this.age = age;
        this.averageScore = averageScore;
    }

    // Getter和Setter方法
    public String getStudentId() {
        return studentId;
    }

    public void setStudentId(String studentId) {
        this.studentId = studentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getAverageScore() {
        return averageScore;
    }

    public void setAverageScore(double averageScore) {
        this.averageScore = averageScore;
    }

    @Override
    public String toString() {
        return "学号：" + studentId +
                "\t姓名：" + name +
                "\t年龄：" + age +
                "\t平均成绩：" + averageScore;
    }
}    